﻿using System;
using System.Collections;
using NHibernate;
using ParaEditor.Common;
using ParaEditor.Common.NHibernate;
using ParaEditor.DAO.ParaDAO;
using ParaEditor.Domain.Entities;
using System.Collections.Generic;

namespace ParaEditor.Test
{
    class Program
    {
        

        static void Main(string[] args)
        {
            ISession _session;
            NHibernateHelper _helper;
            //Para3006DAO _sample;
            _helper = new NHibernateHelper();
            _session = _helper.GetSession();
            ResultValue rv = new ResultValue();
            if (_session != null)
            {
                /*
                Para2080DAO p2080Dao = new Para2080DAO(_session);
                Para2080 p2080 = new Para2080();
                p2080.infoVer = 1;
                p2080.setTime = "dedede";
                rv = p2080Dao.CreateObject(p2080);
                */

                
                Para3006DAO p3006Dao = new Para3006DAO();
                Para3006 p3006 = new Para3006();
                Para3006Pk para3006pk = new Para3006Pk();
                IList<int> infoVer = p3006Dao.GetAllVersion();
                //IList list = p3006Dao.GetAll();
                //IList list = p3006Dao.GetAll(p3006);
                

                
                para3006pk.StationNid = "1003";
                para3006pk.StationVer = p3006Dao.GetMaxID() + 1;
                p3006.para3006Pk = para3006pk;
                p3006.LineId = "00";
                p3006.OwnerId = "test";
                p3006Dao.CreateObject(p3006);
                
                

                /*
                Para3007DAO p3007Dao = new Para3007DAO(_session);
                Para3007 p3007 = new Para3007();
                Para3007Pk para3007pk = new Para3007Pk();
                para3007pk.InfoVer = 1;
                para3007pk.LineID = "12";
                p3007.para3007Pk = para3007pk;
                p3007.LineIdbcd = "++";
                p3007Dao.CreateObject(p3007);
                */

                /*
                Para3011DAO p3011Dao = new Para3011DAO(_session);
                Para3011 p3011 = new Para3011();
                Para3011Pk p3011Pk = new Para3011Pk();
                p3011Pk.infoVer = 1;
                p3011Pk.movAmt = 111;
                p3011.para3011Pk = p3011Pk;
                p3011.movDetail = "test";
                p3011Dao.CreateObject(p3011);
                */

                /*
                Para3082DAO p3082Dao = new Para3082DAO(_session);
                Para3082 p3082 = new Para3082();
                //p3082.infoVer = 1;
                p3082.baseSc = "test";
                p3082.shadowSc1 = "ssc1";
                p3082.shadowSc2 = "ssc2";
                p3082.shadowSc3 = "ssc3";
                p3082.shadowSc4 = "ssc4";
                p3082.shadowSc5 = "ssc5";
                rv = p3082Dao.CreateObject(p3082);
                */

                /*
                Para3083DAO p3083Dao = new Para3083DAO(_session);
                Para3083 p3083 = new Para3083();
                p3083.infoVer = 1;
                p3083.validTime = "test";
                p3083.recNum = 1;
                p3083.formindex = 1;
                p3083.imagename = "test";
                p3083.imagewidth = 1;
                p3083.imageheight = 1;
                p3083.buttonx = 1;
                p3083.buttony = 1;
                p3083.langlength = 1;
                p3083.langwidth = 1;
                p3083.buttonvalid1 = 1;
                p3083.buttonx1 = 1;
                p3083.buttony1 = 1;
                p3083.buttonlength1 = 1;
                p3083.buttonwidth1 = 1;
                p3083.buttonformindex1 = 1;
                p3083.buttonvalid2 = 1;
                p3083.buttonx2 = 1;
                p3083.buttony2 = 1;
                p3083.buttonlength2 = 1;
                p3083.buttonwidth2 = 1;
                p3083.buttonformindex2 = 1;
                p3083.buttonvalid3 = 1;
                p3083.buttonx3 = 1;
                p3083.buttony3 = 1;
                p3083.buttonlength3 = 1;
                p3083.buttonwidth3 = 1;
                p3083.buttonformindex3 = 1;
                p3083.buttonvalid4 = 1;
                p3083.buttonx4 = 1;
                p3083.buttony4 = 1;
                p3083.buttonlength4 = 1;
                p3083.buttonwidth4 = 1;
                p3083.buttonformindex4 = 1;
                p3083.resv11 = 1;
                p3083.resv12 = 1;
                p3083.resv13 = 1;
                p3083.resv14 = 1;
                p3083.linecount = 1;
                rv = p3083Dao.CreateObject(p3083);
                */

                /*
                Para3084DAO p3084Dao = new Para3084DAO(_session);
                Para3084 p3084 = new Para3084();
                p3084.infoVer = 1;
                p3084.recNum = 1;
                p3084.lineid = 1;
                p3084.filename = "test";
                p3084.stationcount = 1;
                p3084.resv11 = 1;
                p3084.resv12 = 1;
                p3084.resv13 = 1;
                p3084.resv14 = 1;
                p3084.statnid = 1;
                p3084.XPoint = 1;
                p3084.YPoint = 1;
                p3084.length = 1;
                p3084.width = 1;
                p3084.resv2 = 1;
                rv = p3084Dao.CreateObject(p3084);
                */

                /*
                Para3085Pk para3085Pk = new Para3085Pk();
                para3085Pk.baseSc = "test";
                para3085Pk.infoVer = 1;
                Para3085 p3085 = new Para3085();
                p3085.para3085Pk = para3085Pk;
                p3085.shadowSc1 = "test";
                p3085.shadowSc2 = "test";
                p3085.shadowSc3 = "test";
                p3085.shadowSc4 = "test";
                p3085.shadowSc5 = "test";
                Para3085DAO p3085Dao = new Para3085DAO(_session);
                rv = p3085Dao.CreateObject(p3085);
                */

                /*
                Para4001Pk p4001Pk = new Para4001Pk();
                p4001Pk.infoVer = 1;
                p4001Pk.recordId = 1;
                Para4001 p4001 = new Para4001();
                p4001.para4001Pk = p4001Pk;
                p4001.holidayStart = "20000101";
                Para4001DAO p4001Dao = new Para4001DAO(_session);
                rv = p4001Dao.CreateObject(p4001);
                */

                /*
                Para4002Pk para4002Pk = new Para4002Pk();
                para4002Pk.infoVer = 1;
                para4002Pk.ticketType = 1;
                Para4002 p4002 = new Para4002();
                p4002.para4002Pk = para4002Pk;
                p4002.tid = 1;
                p4002.resv1 = "1";
                p4002.resv2 = "1";
                p4002.lostFine = 1;
                p4002.farFine = 1;
                p4002.lateFine = 1;
                p4002.ioAddonFine = 1;
                p4002.initVal = 1;
                p4002.tomorrowHour = 1;
                p4002.longestPeriodArea1 = 1;
                p4002.longestPeriodArea2 = 1;
                p4002.longestPeriodArea3 = 1;
                p4002.longestPeriodArea4 = 1;
                p4002.longestPeriodArea5 = 1;
                p4002.longestPeriodArea6 = 1;
                p4002.longestPeriodArea7 = 1;
                p4002.longestPeriodArea8 = 1;
                p4002.longestPeriodArea9 = 1;
                p4002.longestPeriodArea10 = 1;
                p4002.longestPeriodArea11 = 1;
                p4002.longestPeriodArea12 = 1;
                p4002.longestPeriodArea13 = 1;
                p4002.longestPeriodArea14 = 1;
                p4002.longestPeriodArea15 = 1;
                p4002.longestPeriodArea16 = 1;
                p4002.nameEn = "1";
                p4002.nameCn = "1";
                p4002.nameCnPointer = 1;
                p4002.ctrlResv1 = 1;
                p4002.ctrlResv2 = 1;
                p4002.ctrlResv3 = 1;
                p4002.ctrlResv4 = 1;
                p4002.ctrlReward = 1;
                p4002.ctrlCanfill = 1;
                p4002.ctrlCansale = 1;
                p4002.ctrlResv5 = 1;
                p4002.ctrlNotdef = "1";
                p4002.ticketPriceAward = 1;
                p4002.verifyResv1 = 1;
                p4002.accmTakeAward = 1;
                p4002.accmAwardWay = 1;
                p4002.comboAward = 1;
                p4002.verifyResv2 = 1;
                p4002.verifyResv3 = 1;
                p4002.verifyResv4 = 1;
                p4002.lastReward = 1;
                p4002.checkGiveStatn = 1;
                p4002.reusable = 1;
                p4002.lightOn = 1;
                p4002.beepOn = 1;
                p4002.verifyResv5 = 1;
                p4002.verifyResv6 = 1;
                p4002.verifyNotdef = 1;
                p4002.validPeriod = 1;
                p4002.specialVerify = 1;
                p4002.initValue = 1;
                p4002.keptValue = 1;
                p4002.sptcInitVal = 1;
                p4002.sptcInitAward = 1;
                p4002.sptcFillSelection1 = 1;
                p4002.sptcFillSelection2 = 1;
                p4002.sptcFillSelection3 = 1;
                p4002.sptcFillSelection4 = 1;
                p4002.sptcFillAward1 = 1;
                p4002.sptcFillAward2 = 1;
                p4002.sptcFillAward3 = 1;
                p4002.sptcFillAward4 = 1;
                p4002.rateTimeLooseWorkday = 1;
                p4002.rateTimeNonbusyWorkday = 1;
                p4002.rateTimeOffNonbusyWorkday = 1;
                p4002.rateTimeFullBusyWorkday = 1;
                p4002.rateTimeLooseWeekend = 1;
                p4002.rateTimeNonbusyWeekend = 1;
                p4002.rateTimeOffNonbusyWeekend = 1;
                p4002.rateTimeFullBusyWeekend = 1;
                p4002.rateTimeLooseHoliday = 1;
                p4002.rateTimeNonbusyHoliday = 1;
                p4002.rateTimeOffNonbusyHoliday = 1;
                p4002.rateTimeFullBusyHoliday = 1;
                p4002.rateTimeLooseNotdef = 1;
                p4002.rateTimeNonbusyNotdef = 1;
                p4002.rateTimeOffNonbusyNotdef = 1;
                p4002.rateTimeFullBusyNotdef = 1;
                p4002.accmAwardStartTimes = 1;
                p4002.accmAwardStartValue = 1;
                p4002.accmAwardPercent = "1";
                p4002.firstComboRate = "1";
                p4002.secondComboRate = "1";
                p4002.awardPriority = true;
                p4002.awardValidPeriod = 1;
                p4002.awardIndustryBus = 1;
                p4002.awardIndustryShip = 1;
                p4002.awardIndustryResv1 = 1;
                p4002.awardIndustryResv2 = 1;
                p4002.awardIndustryResv3 = 1;
                p4002.awardIndustryResv4 = 1;
                p4002.awardIndustryResv5 = 1;
                p4002.awardIndustryResv6 = 1;
                p4002.resv3 = 1;
                p4002.resvBlock1 = 1;
                p4002.resvBlock2 = 1;
                p4002.resvBlock3 = 1;
                p4002.resvBlock4 = 1;
                p4002.resvbyte1 = 1;
                p4002.resvbyte2 = 1;
                p4002.resvbyte3 = 1;
                p4002.mostTimes = 1;
                p4002.resv4 = 1;
                p4002.spaceTime = 1;
                p4002.tzTicketType = 1;
                p4002.jsjcTimeUnit = 1;
                p4002.timeoutAmount = 1;
                p4002.ioBpAmout = 1;
                p4002.resvBlock21 = 1;
                p4002.resvBlock22 = 1;
                p4002.resvBlock23 = 1;
                p4002.transYx = 1;
                p4002.cpuQyFlag = 1;
                p4002.sptcMaxAmount = 1;
                Para4002DAO p4002Dao = new Para4002DAO(_session);
                rv = p4002Dao.CreateObject(p4002);
                */

                /*
                Para4003Pk para4003Pk = new Para4003Pk();
                para4003Pk.infoVer = 1;
                para4003Pk.recordId = 1;
                Para4003 p4003 = new Para4003();
                p4003.para4003Pk = para4003Pk;
                p4003.rate1 = 1;
                p4003.rate2 = 1;
                p4003.rate3 = 1;
                p4003.rate4 = 1;
                p4003.rate5 = 1;
                p4003.rate6 = 1;
                p4003.rate7 = 1;
                p4003.rate8 = 1;
                p4003.rate9 = 1;
                p4003.rate10 = 1;
                p4003.rate11 = 1;
                p4003.rate12 = 1;
                p4003.rate13 = 1;
                p4003.rate14 = 1;
                p4003.rate15 = 1;
                p4003.rate16 = 1;
                p4003.rate17 = 1;
                p4003.rate18 = 1;
                p4003.rate19 = 1;
                p4003.rate20 = 1;
                p4003.rate21 = 1;
                p4003.rate22 = 1;
                p4003.rate23 = 1;
                p4003.rate24 = 1;
                p4003.rate25 = 1;
                p4003.rate26 = 1;
                p4003.rate27 = 1;
                p4003.rate28 = 1;
                p4003.rate29 = 1;
                p4003.rate30 = 1;
                p4003.rate31 = 1;
                p4003.rate32 = 1;
                p4003.rate33 = 1;
                p4003.rate34 = 1;
                p4003.rate35 = 1;
                p4003.rate36 = 1;
                p4003.rate37 = 1;
                p4003.rate38 = 1;
                p4003.rate39 = 1;
                p4003.rate40 = 1;
                p4003.rate41 = 1;
                p4003.rate42 = 1;
                p4003.rate43 = 1;
                p4003.rate44 = 1;
                p4003.rate45 = 1;
                p4003.rate46 = 1;
                p4003.rate47 = 1;
                p4003.rate48 = 1;
                p4003.rate49 = 1;
                p4003.rate50 = 1;
                p4003.rate51 = 1;
                p4003.rate52 = 1;
                p4003.rate53 = 1;
                p4003.rate54 = 1;
                p4003.rate55 = 1;
                p4003.rate56 = 1;
                p4003.rate57 = 1;
                p4003.rate58 = 1;
                p4003.rate59 = 1;
                p4003.rate60 = 1;
                p4003.rate61 = 1;
                p4003.rate62 = 1;
                p4003.rate63 = 1;
                p4003.rate64 = 1;
                p4003.rateResv01 = 1;
                p4003.rateResv02 = 1;
                p4003.rateResv03 = 1;
                p4003.rateResv04 = 1;
                p4003.rateResv05 = 1;
                p4003.rateResv06 = 1;
                p4003.rateResv07 = 1;
                p4003.rateResv08 = 1;
                p4003.rateResv09 = 1;
                p4003.rateResv10 = 1;
                p4003.rateResv11 = 1;
                p4003.rateResv12 = 1;
                p4003.rateResv13 = 1;
                p4003.rateResv14 = 1;
                p4003.rateResv15 = 1;
                p4003.rateResv16 = 1;
                p4003.rateResv17 = 1;
                p4003.rateResv18 = 1;
                p4003.rateResv19 = 1;
                p4003.rateResv20 = 1;
                p4003.rateResv21 = 1;
                p4003.rateResv22 = 1;
                p4003.rateResv23 = 1;
                p4003.rateResv24 = 1;
                p4003.rateResv25 = 1;
                p4003.rateResv26 = 1;
                p4003.rateResv27 = 1;
                p4003.rateResv28 = 1;
                p4003.rateResv29 = 1;
                p4003.rateResv30 = 1;
                p4003.rateResv31 = 1;
                p4003.rateResv32 = 1;
                p4003.rateResv33 = 1;
                p4003.rateResv34 = 1;
                p4003.rateResv35 = 1;
                p4003.rateResv36 = 1;
                Para4003DAO p4003Dao = new Para4003DAO(_session);
                rv = p4003Dao.CreateObject(p4003);
                */

                /*
                Para4004Pk para4004Pk = new Para4004Pk();
                Para4004 p4004 = new Para4004();
                p4004.para4004Pk = para4004Pk;
                p4004.ownerStation = "test";
                p4004.inStationId = "test";
                p4004.areaInfo = 1;
                p4004.lineId = "te";
                p4004.areaResv = 1;
                Para4004DAO p4004Dao = new Para4004DAO(_session);
                rv = p4004Dao.CreateObject(p4004);
                */

                /*
                Para4006Pk para4006Pk = new Para4006Pk();
                para4006Pk.infoVer = 1;
                para4006Pk.recordId = 1;
                Para4006 p4006 = new Para4006();
                p4006.para4006Pk = para4006Pk;
                p4006.timeDef = "test";
                Para4006DAO p4006Dao = new Para4006DAO(_session);
                rv = p4006Dao.CreateObject(p4006);
                */


                if(rv.Code != 0)
                {
                    Console.WriteLine(rv.Msg);
                    Console.ReadLine();
                }
            }
            
        }
    }
}
